home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / bit / src / forms / FORMS / free.c < prev    next >
C/C++ Source or Header  |  1994-08-01  |  837b  |  38 lines

  1. /*
  2.  * free.c
  3.  *
  4.  * Forms Object class: FREE
  5.  *
  6.  * Written by: Mark Overmars
  7.  *
  8.  * Version 2.0 a
  9.  * Date: Nov 11, 1991
  10.  */
  11.  
  12. #include "forms.h"
  13.  
  14. FL_OBJECT *fl_create_free(int type,float x,float y,float w,float h,char label[],
  15.             FL_HANDLEPTR handle)
  16. /* creates a free object */
  17. {
  18.   FL_OBJECT *obj;
  19.   obj = fl_make_object(FL_FREE,type,x,y,w,h,label,handle);
  20.  
  21.   if (type == FL_SLEEPING_FREE) obj->active = 0;
  22.   if (type == FL_CONTINUOUS_FREE) obj->automatic = 1;
  23.   if (type == FL_INPUT_FREE) obj->input = 1;
  24.   if (type == FL_ALL_FREE) {obj->input = 1; obj->automatic = 1;}
  25.  
  26.   return obj;
  27. }
  28.  
  29. FL_OBJECT *fl_add_free(int type, float x, float y, float w, float h,
  30.              char label[], FL_HANDLEPTR handle)
  31. /* Adds an object */
  32. {
  33.   FL_OBJECT *ob;
  34.   ob = fl_create_free(type,x,y,w,h,label,handle);
  35.   fl_add_object(fl_current_form,ob);
  36.   return ob;
  37. }
  38.